import request from "@/utils/request";

const BASE_URL = "/api/admin";


const ImgAPI = {
  getAllImg() {
    return request<any, ImgInfoData>({
      url: `/admin/getImages`,
      method: "get",
    });
  },
  deleteImg(filename:string) {
    return request<any, any>({
      url: `/admin/delImages`,
      params:{ filename },
      method: "delete",
    });
  },
};

export default ImgAPI;

export interface ImgInfoData {
  images: ImgInfo[];
  count: number;
}

export interface ImgInfo {
  name: string;
  url: string;
}
